{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}{% endblock %}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <script src="{% static 'bootstrap/js/jquery-3.2.1.min.js' %}"></script>
    <script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
    <script src="{% static 'bootstrap/js/masonry.pkgd.min.js' %}"></script>
    <script src="{% static 'bootstrap/js/common.js' %}"></script>
    <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'bootstrap/css/common.css' %}">

    <script>
        $(document).ready(function () {
            $.ajaxSetup({
                data: {csrfmiddlewaretoken: '{{ csrf_token }}'},
            });

            $('.return-top').click(function () {
                $('html, body').animate({
                    scrollTop: 0
                }, 300);
            });


        })
    </script>
</head>
<body>


<nav class="navbar navbar-default">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="{% url 'index' %}">爱链</a>
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse-navbar">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

        </div>
        <div class="collapse navbar-collapse" id="collapse-navbar">
            <ul class="nav navbar-nav" style="margin-top: 0">
                {% if username %}
                    <li><a href="{% url 'urlmanager' %}">地址收藏</a></li>
                    <li><a href="{% url 'pmp' %}">PMP术语</a></li>
                    <li><a href="{% url 'softwaretest' %}">ISTQB(软件测试)术语</a></li>
                    <li><a href="#">{{ username }}</a></li>
                    <li><a href="{% url 'auth_logout' %}">注销</a></li>

                {% else %}
                    <li><a href="{% url 'urlmanager' %}">地址收藏</a></li>
                    <li><a href="{% url 'pmp' %}">PMP术语</a></li>
                    <li><a href="{% url 'softwaretest' %}">ISTQB(软件测试)术语</a></li>
                    <li><a href="{% url 'auth_login' %}">登陆</a></li>
                    <li><a href="{% url 'registration_register' %}">注册</a></li>

                {% endif %}

            </ul>
        </div>


    </div>

</nav>

<div class="container">
    {% block content %}

    {% endblock %}

</div>
<div class="container">
    <div class="footer">
        <hr>
        <ul>
            <li>Power by @chrishshare</li>
            <li>chrishshare版权所有</li>
        </ul>
    </div>
</div>


</body>
</html>